package liangAhh.controller;

import java.io.IOException;

import liangAhh.file.FileHandle;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;


/**
 * 测试
 * @author 梁冲
 * @date 2016年1月20日
 */
@Controller
public class TestController {
	
	@RequestMapping(value="test",method=RequestMethod.GET)
	public String test(){
		return "test";
	}
	
	@RequestMapping(value="testUploadFile",method=RequestMethod.POST)
	public String testUploadFile(MultipartFile mfile) throws IOException{
		FileHandle.uploadFile(mfile, "test.jpg", "f:/test/uploadfile");
		return "success";
	}
}
